package io.renren.modules.neo4j.controller;

import io.renren.common.utils.R;
import io.renren.modules.neo4j.entity.node.course;
import io.renren.modules.neo4j.entity.node.knowledge;
import io.renren.modules.neo4j.entity.node.material;
import io.renren.modules.neo4j.service.KnowledgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("api/neo/material")
public class KnowledgeController {

    @Autowired
    KnowledgeService knowledgeService;


    @GetMapping(path = "/getKnowledgeById")
    public R addCourse(Long id) {
        knowledge o=knowledgeService.getKnowledgeById(id);
        return R.ok()
                .put("knowledge",o)
//                .put("title",o.getName())
//                .put("id",o.getName())
//                .put("upKnowledge",o.getUpKnowledge())
//                .put("downKnowledge",o.getDownKnowledge())
//                .put("material",o.getMaterial())
//                .put("upOutknowledge",o.getUpOutknowledge())
//                .put("downOutknowledge",o.getDownOutknowledge())
                ;
       // return o;
    }





}
